<?php

/**
 * Subclass for representing a row from the 'categories' table.
 *
 *
 *
 * @package lib.model
 */
class Categories extends BaseCategories
{
	public function getSubcategories()
	{
		$c = new Criteria();
		$c->add(CategoriesPeer::PARENT_ID, $this->getCategoriesId());
		return CategoriesPeer::doSelect($c);
	}

	public function countSubcategories()
	{
		$c = new Criteria();
		$c->add(CategoriesPeer::PARENT_ID, $this->getCategoriesId());
		return CategoriesPeer::doCount($c);
	}

	public function __toString()
	{
		return $this->getCategoriesName();
	}
}
